﻿using System;
using System.Collections.Generic;

namespace CoreEx.Common.Repository.Implementation
{
    [Serializable]
    public class ObjectState : IObjectState
    {
        public ObjectState()
        {
        }

        public ObjectState(Object target,StateType state, IDictionary<string, object> propertyValues)
        {
            Target = target;
            State = state;
            OriginalValues = propertyValues;
        }

        public object Target { get; set;}        
        public StateType State { get; set;}       
        public IDictionary<string, object> OriginalValues { get; set;}

        public override string ToString()
        {
            return string.Format("{0}({1})", Target, State);
        }
    }
}
